Data can be compressed using a lossless or lossy compression algorithm to reduce the amount of data required to store or transmit digital content. Lossless compression algorithms reconstruct the original message exactly from the compressed representation. By contrast, lossy compression algorithms can reconstruct the original message but with lost data or reduced quality. Lossless data compression algorithms include Lempel-Ziv (LZ) algorithms such as LZ77 and LZ4. Applications that perform file compression and decompression and that can use LZ lossless data compression algorithms include GNU zip (gzip), GIF (Graphics Exchange Format) and Zstandard.
A dictionary coder is a class of lossless data compression algorithms that operates by searching for a match between text in the message to be compressed and a set of strings in a “dictionary” maintained by an encoder. When the encoder finds a match for a string in the message, it substitutes the string with a reference to the string's position in the dictionary.